3.355 \(\int \frac{\log (x)}{x (a+b x+c x^2)} \, dx\)

Optimal. Leaf size=204 \[ -\frac{\left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 a}-\frac{\log (x) \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \log \left (\frac{2 c x}{b-\sqrt{b^2-4 a c}}+1\right )}{2 a}-\frac{\log (x) \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \log \left (\frac{2 c x}{\sqrt{b^2-4 a c}+b}+1\right )}{2 a}+\frac{\log ^2(x)}{2 a} \]

[Out]

Log[x]^2/(2*a) - ((1 + b/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 - b/S
qrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 + b/Sqrt[b^2 - 4*a*c])*PolyLog[
2, (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 - b/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4
*a*c])])/(2*a)

________________________________________________________________________________________

Rubi [A]  time = 0.282238, antiderivative size = 204, normalized size of antiderivative = 1., number of steps used = 9, number of rules used = 4, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222, Rules used = {2357, 2301, 2317, 2391} \[ -\frac{\left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \text{PolyLog}\left (2,-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )}{2 a}-\frac{\log (x) \left (\frac{b}{\sqrt{b^2-4 a c}}+1\right ) \log \left (\frac{2 c x}{b-\sqrt{b^2-4 a c}}+1\right )}{2 a}-\frac{\log (x) \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \log \left (\frac{2 c x}{\sqrt{b^2-4 a c}+b}+1\right )}{2 a}+\frac{\log ^2(x)}{2 a} \]

Antiderivative was successfully verified.

[In]

Int[Log[x]/(x*(a + b*x + c*x^2)),x]

[Out]

Log[x]^2/(2*a) - ((1 + b/Sqrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 - b/S
qrt[b^2 - 4*a*c])*Log[x]*Log[1 + (2*c*x)/(b + Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 + b/Sqrt[b^2 - 4*a*c])*PolyLog[
2, (-2*c*x)/(b - Sqrt[b^2 - 4*a*c])])/(2*a) - ((1 - b/Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b + Sqrt[b^2 - 4
*a*c])])/(2*a)

Rule 2357

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2317

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[1 + (e*x)/d]*(a +
b*Log[c*x^n])^p)/e, x] - Dist[(b*n*p)/e, Int[(Log[1 + (e*x)/d]*(a + b*Log[c*x^n])^(p - 1))/x, x], x] /; FreeQ[
{a, b, c, d, e, n}, x] && IGtQ[p, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\log (x)}{x \left (a+b x+c x^2\right )} \, dx &=\int \left (\frac{\log (x)}{a x}+\frac{(-b-c x) \log (x)}{a \left (a+b x+c x^2\right )}\right ) \, dx\\ &=\frac{\int \frac{\log (x)}{x} \, dx}{a}+\frac{\int \frac{(-b-c x) \log (x)}{a+b x+c x^2} \, dx}{a}\\ &=\frac{\log ^2(x)}{2 a}+\frac{\int \left (\frac{\left (-c-\frac{b c}{\sqrt{b^2-4 a c}}\right ) \log (x)}{b-\sqrt{b^2-4 a c}+2 c x}+\frac{\left (-c+\frac{b c}{\sqrt{b^2-4 a c}}\right ) \log (x)}{b+\sqrt{b^2-4 a c}+2 c x}\right ) \, dx}{a}\\ &=\frac{\log ^2(x)}{2 a}-\frac{\left (c \left (1-\frac{b}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{\log (x)}{b+\sqrt{b^2-4 a c}+2 c x} \, dx}{a}-\frac{\left (c \left (1+\frac{b}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{\log (x)}{b-\sqrt{b^2-4 a c}+2 c x} \, dx}{a}\\ &=\frac{\log ^2(x)}{2 a}-\frac{\left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 a}+\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{x} \, dx}{2 a}+\frac{\left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \int \frac{\log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{x} \, dx}{2 a}\\ &=\frac{\log ^2(x)}{2 a}-\frac{\left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \log (x) \log \left (1+\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1+\frac{b}{\sqrt{b^2-4 a c}}\right ) \text{Li}_2\left (-\frac{2 c x}{b-\sqrt{b^2-4 a c}}\right )}{2 a}-\frac{\left (1-\frac{b}{\sqrt{b^2-4 a c}}\right ) \text{Li}_2\left (-\frac{2 c x}{b+\sqrt{b^2-4 a c}}\right )}{2 a}\\ \end{align*}

Mathematica [A]  time = 0.205468, size = 227, normalized size = 1.11 \[ \frac{-\left (\sqrt{b^2-4 a c}+b\right ) \text{PolyLog}\left (2,\frac{2 c x}{\sqrt{b^2-4 a c}-b}\right )+\left (b-\sqrt{b^2-4 a c}\right ) \text{PolyLog}\left (2,-\frac{2 c x}{\sqrt{b^2-4 a c}+b}\right )+\log (x) \left (\log (x) \sqrt{b^2-4 a c}-\left (\sqrt{b^2-4 a c}+b\right ) \log \left (\frac{-\sqrt{b^2-4 a c}+b+2 c x}{b-\sqrt{b^2-4 a c}}\right )+\left (b-\sqrt{b^2-4 a c}\right ) \log \left (\frac{\sqrt{b^2-4 a c}+b+2 c x}{\sqrt{b^2-4 a c}+b}\right )\right )}{2 a \sqrt{b^2-4 a c}} \]

Antiderivative was successfully verified.

[In]

Integrate[Log[x]/(x*(a + b*x + c*x^2)),x]

[Out]

(Log[x]*(Sqrt[b^2 - 4*a*c]*Log[x] - (b + Sqrt[b^2 - 4*a*c])*Log[(b - Sqrt[b^2 - 4*a*c] + 2*c*x)/(b - Sqrt[b^2
- 4*a*c])] + (b - Sqrt[b^2 - 4*a*c])*Log[(b + Sqrt[b^2 - 4*a*c] + 2*c*x)/(b + Sqrt[b^2 - 4*a*c])]) - (b + Sqrt
[b^2 - 4*a*c])*PolyLog[2, (2*c*x)/(-b + Sqrt[b^2 - 4*a*c])] + (b - Sqrt[b^2 - 4*a*c])*PolyLog[2, (-2*c*x)/(b +
 Sqrt[b^2 - 4*a*c])])/(2*a*Sqrt[b^2 - 4*a*c])

________________________________________________________________________________________

Maple [B]  time = 0.068, size = 375, normalized size = 1.8 \begin{align*}{\frac{ \left ( \ln \left ( x \right ) \right ) ^{2}}{2\,a}}-{\frac{\ln \left ( x \right ) }{2\,a}\ln \left ({ \left ( -2\,cx+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }-{\frac{\ln \left ( x \right ) b}{2\,a}\ln \left ({ \left ( -2\,cx+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{\ln \left ( x \right ) }{2\,a}\ln \left ({ \left ( 2\,cx+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }+{\frac{\ln \left ( x \right ) b}{2\,a}\ln \left ({ \left ( 2\,cx+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{1}{2\,a}{\it dilog} \left ({ \left ( -2\,cx+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }-{\frac{b}{2\,a}{\it dilog} \left ({ \left ( -2\,cx+\sqrt{-4\,ac+{b}^{2}}-b \right ) \left ( -b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}}-{\frac{1}{2\,a}{\it dilog} \left ({ \left ( 2\,cx+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ) }+{\frac{b}{2\,a}{\it dilog} \left ({ \left ( 2\,cx+\sqrt{-4\,ac+{b}^{2}}+b \right ) \left ( b+\sqrt{-4\,ac+{b}^{2}} \right ) ^{-1}} \right ){\frac{1}{\sqrt{-4\,ac+{b}^{2}}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(x)/x/(c*x^2+b*x+a),x)

[Out]

1/2*ln(x)^2/a-1/2/a*ln(x)*ln((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))-1/2/a*ln(x)/(-4*a*c+b^2)^(
1/2)*ln((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b-1/2/a*ln(x)*ln((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(
b+(-4*a*c+b^2)^(1/2)))+1/2/a*ln(x)/(-4*a*c+b^2)^(1/2)*ln((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*
b-1/2/a*dilog((-2*c*x+(-4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))-1/2/a/(-4*a*c+b^2)^(1/2)*dilog((-2*c*x+(-
4*a*c+b^2)^(1/2)-b)/(-b+(-4*a*c+b^2)^(1/2)))*b-1/2/a*dilog((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2))
)+1/2/a/(-4*a*c+b^2)^(1/2)*dilog((2*c*x+(-4*a*c+b^2)^(1/2)+b)/(b+(-4*a*c+b^2)^(1/2)))*b

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/x/(c*x^2+b*x+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left (x\right )}{c x^{3} + b x^{2} + a x}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/x/(c*x^2+b*x+a),x, algorithm="fricas")

[Out]

integral(log(x)/(c*x^3 + b*x^2 + a*x), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(x)/x/(c*x**2+b*x+a),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left (x\right )}{{\left (c x^{2} + b x + a\right )} x}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(x)/x/(c*x^2+b*x+a),x, algorithm="giac")

[Out]

integrate(log(x)/((c*x^2 + b*x + a)*x), x)